|
In Unix-like operating systems, unlink is a system call and a command line utility to delete files. The program directly interfaces the system call, which removes the file name and (but not on GNU systems) directories like rm and rmdir.〔(GNU unlink documentation )〕 If the file name was the last hard link to the file, the file itself is deleted as soon as no program has it open.〔(POSIX unlink specification )〕 It also appears in the PHP, Node.js and Perl programming languages in the form of the ''unlink()'' built-in function. Like the Unix utility, it is also used to delete files.〔(PHP.net - Unlink function )〕〔(perldoc - unlink )〕 == Example == To delete a file named ''foo'', one could type: In PHP, one could use the following function to do the same: The Perl syntax is identical to the PHP syntax, save for the parentheses: In Node.js it is almost the same as the others: 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Unlink (Unix)」の詳細全文を読む スポンサード リンク
|